﻿@model CodeCamp.Models.EventMgmt.SiteUserEditModel

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

<table>
    <tbody>
        <tr>
            <th>Site User Id</th>
            <td>@Html.DisplayFor(model => model.SiteUserId)
            @Html.HiddenFor(model => model.SiteUserId)
            @Html.HiddenFor(model => model.SiteUserHasMembership)
            @if (!Model.EventHasNonPublicPreviewRole)
            {
                @Html.HiddenFor(model => model.IsEventPreviewer)
            }
            </td>
        </tr>
    @if (Model.SiteUserHasMembership)
    {
        <tr>
            <th>@Html.LabelFor(model => model.MemberUsername, "Membership Username")</th>
            <td>@Html.DisplayFor(model => model.MemberUsername)</td>
        </tr>
    }
        <tr>
            <th>UserIdentityProvider</th>
            <td>@Html.DisplayFor(model => model.UserIdentityProvider)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.UserIdentityClaim)</th>
            <td>@Html.DisplayFor(model => model.UserIdentityClaim)
            @Html.HiddenFor(model => model.UserIdentityClaim)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.FirstName, "First Name")</th>
            <td>@Html.EditorFor(model => model.FirstName)
                @Html.ValidationMessageFor(model => model.FirstName)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.LastName, "Last Name")</th>
            <td>@Html.EditorFor(model => model.LastName)
                @Html.ValidationMessageFor(model => model.LastName)</td>
        </tr>
    @if (Model.SiteUserHasMembership)
    {
        <tr>
            <th>@Html.LabelFor(model => model.MemberEmailAddress, "Email (member)")</th>
            <td>@Html.EditorFor(model => model.MemberEmailAddress)
                @Html.ValidationMessageFor(model => model.MemberEmailAddress)</td>
        </tr>
    }
        <tr>
            <th>@Html.LabelFor(model => model.EmailAddress, "Email (site user)")</th>
            <td>@Html.EditorFor(model => model.EmailAddress)
                @Html.ValidationMessageFor(model => model.EmailAddress)</td>
        </tr>
        <tr>
            <th>Email (from Site User Claim)</th>
            <td>@Html.DisplayFor(model => model.UserClaimEmailAddress)</td>
        </tr>

        <tr>
            <th>@Html.LabelFor(model => model.IsBigCheeze, "Is Big Cheeze")</th>
            <td>@Html.EditorFor(model => model.IsBigCheeze)
                @Html.ValidationMessageFor(model => model.IsBigCheeze)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.IsEventContentEditor, "Is Event Editor")</th>
            <td>@Html.EditorFor(model => model.IsEventContentEditor)
                @Html.ValidationMessageFor(model => model.IsEventContentEditor)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.IsEventTrackLead, "Is Event Track Lead")</th>
            <td>@Html.EditorFor(model => model.IsEventTrackLead)
                @Html.ValidationMessageFor(model => model.IsEventTrackLead)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.IsPresenter, "Is Presenter (at some event)")</th>
            <td>@Html.EditorFor(model => model.IsPresenter)
                @Html.ValidationMessageFor(model => model.IsPresenter)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.IsEventPreviewer, string.Format("Is Event Previewer ({0})", Model.NonPublicEventPreviewRole))</th>
            <td>
    @if (Model.EventHasNonPublicPreviewRole)
    {
                @Html.EditorFor(model => model.IsEventPreviewer)
                @Html.ValidationMessageFor(model => model.IsEventPreviewer)
    }
    else
    {
                @Html.DisplayFor(model => model.IsEventPreviewer)
    }
            </td>
        </tr>
        <tr>
            <th>Creation Date (UTC)</th>
            <td>@Html.DisplayFor(model => model.CreatedUTC)</td>
        </tr>
        <tr>
            <th>Created by</th>
            <td>@Html.DisplayFor(model => model.CreatedBy)</td>
        </tr>
        <tr>
            <th>Update Date (UTC)</th>
            <td>@Html.DisplayFor(model => model.UpdatedUTC)</td>
        </tr>
        <tr>
            <th>Updated by</th>
            <td>@Html.DisplayFor(model => model.UpdatedBy)</td>
        </tr>
        <tr>
            <th>Last Login (UTC)</th>
            <td>@Html.DisplayFor(model => model.LastLoginUTC)</td>
        </tr>
        <tr>
            <th>Last Activity (UTC)</th>
            <td>@Html.DisplayFor(model => model.LastOnlineActivityUTC)</td>
        </tr>
        <tr>
            <th>@Html.LabelFor(model => model.IsApproved, "Is Approved")</th>
            <td>@Html.EditorFor(model => model.IsApproved)
                @Html.ValidationMessageFor(model => model.IsApproved)</td>
        </tr>
    @if (Model.SiteUserHasMembership)
    {
        <tr>
            <th>@Html.LabelFor(model => model.MemberIsApproved, "Is Approved (member)")</th>
            <td>@Html.EditorFor(model => model.MemberIsApproved)
                @Html.ValidationMessageFor(model => model.MemberIsApproved)</td>
        </tr>
    }
        <tr>
            <th>Is Locked Out</th>
            <td>@Html.DisplayFor(model => model.IsLockedOut)</td>
        </tr>
    @if (Model.SiteUserHasMembership)
    {
        <tr>
            <th>Is Locked Out (member)</th>
            <td>@Html.DisplayFor(model => model.MemberIsLockedOut)</td>
        </tr>
        <tr>
            <th>Is Online (member)</th>
            <td>@Html.DisplayFor(model => model.MemberIsOnline)</td>
        </tr>
    }
        <tr>
            <th></th>
            <td>
            <input type="submit" value="Save" />
            </td>
        </tr>
    </tbody>
</table>
   
}
